home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / gfxprograms / conversion / pbmplus / doc / ppm.doc < prev    next >
Text File  |  1995-02-13  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4. ppm(5)                      PBM Plus                       ppm(5)
  5.  
  6.  
  7.  
  8. NAME
  9.      ppm - portable pixmap file format
  10.  
  11. DESCRIPTION
  12.      The portable pixmap format is a lowest common denominator
  13.      color image file format.  The definition is as follows:
  14.  
  15.      - A "magic number" for identifying the file type.  A ppm
  16.        file's magic number is the two characters "P3".
  17.  
  18.      - Whitespace (blanks, TABs, CRs, LFs).
  19.  
  20.      - A width, formatted as ASCII characters in decimal.
  21.  
  22.      - Whitespace.
  23.  
  24.      - A height, again in ASCII decimal.
  25.  
  26.      - Whitespace.
  27.  
  28.      - The maximum color-component value, again in ASCII decimal.
  29.  
  30.      - Whitespace.
  31.  
  32.      - Width * height pixels, each three ASCII decimal values
  33.        between 0 and the specified maximum value, starting at the
  34.        top-left corner of the pixmap, proceding in normal English
  35.        reading order.  The three values for each pixel represent
  36.        red, green, and blue, respectively; a value of 0 means
  37.        that color is off, and the maximum value means that color
  38.        is maxxed out.
  39.  
  40.      - Characters from a "#" to the next end-of-line are ignored
  41.        (comments).
  42.  
  43.      - No line should be longer than 70 characters.
  44.  
  45.      Here is an example of a small pixmap in this format:
  46.  
  47.      P3
  48.      # feep.ppm
  49.      4 4
  50.      15
  51.       0  0  0    0  0  0    0  0  0   15  0 15
  52.       0  0  0    0 15  7    0  0  0    0  0  0
  53.       0  0  0    0  0  0    0 15  7    0  0  0
  54.      15  0 15    0  0  0    0  0  0    0  0  0
  55.  
  56.      Programs that read this format should be as lenient as pos-
  57.      sible, accepting anything that looks remotely like a pixmap.
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Printed 5/25/90         05 September 1989                       1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ppm(5)                      PBM Plus                       ppm(5)
  71.  
  72.  
  73.  
  74.      There is also a variant on the format, available by setting
  75.      the RAWBITS option at compile time.  This variant is dif-
  76.      ferent in the following ways:
  77.  
  78.      - The "magic number" is "P6" instead of "P3".
  79.  
  80.      - The pixel values are stored as plain bytes, instead of
  81.        ASCII decimal.
  82.  
  83.      - Whitespace is not allowed in the pixels area.
  84.  
  85.      - The files are smaller and many times faster to read and
  86.        write.
  87.  
  88.      Note that this raw format can only be used for maxvals less
  89.      than or equal to 255.  If you use the PPM library and try to
  90.      write a file with a larger maxval, it will automatically
  91.      fall back on the slower but more general ASCII format.
  92.  
  93. SEE ALSO
  94.      giftoppm(1), ilbmtoppm(1), imgtoppm(1), mtvtoppm(1),
  95.      qrttoppm(1), rasttoppm(1), tgatoppm(1), xwdtoppm(1), ppmto-
  96.      gif(1), ppmtoilbm(1), ppmtopgm(1), ppmtops(1), ppmtorast(1),
  97.      ppmtoxwd(1), ppmarith(1), ppmconvol(1), ppmcscale(1),
  98.      ppmhist(1), ppmquant(1), ppmrotate(1), ppmscale(1),
  99.      ppmshear(1), pnm(5), pgm(5), pbm(5)
  100.  
  101. AUTHOR
  102.      Copyright (C) 1989 by Jef Poskanzer.
  103.  
  104.      Permission to use, copy, modify, and distribute this
  105.      software and its documentation for any purpose and without
  106.      fee is hereby granted, provided that the above copyright
  107.      notice appear in all copies and that both that copyright
  108.      notice and this permission notice appear in supporting docu-
  109.      mentation.  This software is provided "as is" without
  110.      express or implied warranty.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Printed 5/25/90         05 September 1989                       2
  130.  
  131.  
  132.  
  133.